This document will guide you through the setup that is necessary to develop applications using Jadex-Android.

Please report any difficulties or errors in this document as well as in the provided jadex-android libraries.

Installation

You have multiple Options:

  • If you don't use eclipse or maven, just follow step 1.
  • If you want to use eclipse, but not maven, follow step 1 and 2.
  • If you want to use eclipse and maven, follow step 1, 2 and 3.
  • To compile the example project with eclipse and maven, follow steps 1-4.
  • To compile the example project with eclipse without maven follow steps 1,2 and 5.

You can also compile the example project without using eclipse by following steps 1 and 3 and then manually starting the maven build (mvn package).

Step 1

To develop Android applications with jadex-android you need to:

Proceed to the next step if you want to use Eclipse OR start using jadex-android by adding the libraries in the extracted folder lib to your projects build path

Step 2

In order to develop Android applications using Eclipse (with or without maven), you need:

Proceed to the next step if you wish to use maven OR to step 5 if you don't.

Step 3

If you want to use Maven as Build System (required for the included example project):

Since Jadex 2.2 the jadex-android artifacts are available through the maven central repository. Eclipse will download these as necessary for your Jadex Android projects.

Step 4

To import the maven sample project in eclipse (after following steps 2 and 3)

  • extract the jadex-android-example-projects.zip, which is included in the jadex-android distribution
  • copy the jadex-android-example-project-maven directory to your workspace
  • choose File -> Import -> Maven -> Existing Maven Projects
  • select your workspace folder, select the jadex-android-example-project-maven directory and click next / finish until import is completed
  • you will be prompted to install some Eclipse Plugins (m2e android connector) and to restart eclipse
  • after restarting, the project should build without any errors
  • Starting from Version 2.1, the eclipse build will work (just click run as Android Application), if eclipse hangs see Hints on the bottom of this page
  • to build the project with maven (required for jadex-android < 2.1), use the included launch config Build example project with maven 
  • to run the maven build, use the included launch config Run example project with maven, which will deploy and run the project on any android devices plugged in or emulators running.

Step 5

To import the non-maven sample project in eclipse (after following step 1 and 2)

  • extract the jadex-android-example-projects.zip, which is included in the jadex-android distribution
  • select File -> Import -> General -> Existing Projects into Workspace
  • locate the extracted jadex-android-example-project directory
  • optionally check copy projects to workspace
  • click Finish
  • copy the jadex-android libraries to the libs directory of the project and add them to the projects build path (you could skip jadex-android-bdi, bpmn and bdibpmn as the sample only uses a MicroAgent)
  • project should compile without errors
  • Right-click on the example project an choose Run As -> Android Application to start the application.

Hints